<?php

class ProjectController extends Controller {

	public $title = "Online project tool, CMS Online, Only one HTML you cant create simple website, a very, very simple, so fast, so cool website...";
	public $description = "The most stunning HTML5 and CSS3  for creating high fidelity, resolution independent project simple!";
	public function init() {
		parent::init();
		Yii::app()->theme="taskme";

		
	}
	/**
	 * @return array - List of filters
	 */
	public function filters()
	{
		return array();
	}
	
	public function  meta(){
		$title = "<title>{$this->title}</title>";
		$description = '<meta name="description" content="'.$this->description.'" />';
		
		$ico = '<link rel="shortcut icon" href="'.baseTheme().'/favicon.ico" type="image/png">';
		$ico.= '<link rel="shortcut icon" type="image/png" href="'.baseTheme().'/favicon.ico" />';

		
		$twitter = array(
			'card'=>'summary',
			'url'=>'index.html',
			'title'=>$this->title,
			'description'=>$this->description,
			'image'=>'favicon.png',
			'site'=>'Taskme'
		);		
		
		$fb = array(
			'type'=>'website',
			'url'=>'index.html',
			'title'=>$this->title,
			'description'=>$this->description,
			'image'=>'favicon.png',
			'site'=>'Taskme'
		);
		
		$social = "";
		foreach($twitter as $key=>$t){
			$social.= '<meta name="twitter:'.$key.'" content="'.$t.'"/>';
		}
		foreach($fb as $key=>$t){
			$social.= '<meta name="og:'.$key.'" content="'.$t.'"/>';
		}
		
		
		$meta = $title."\n".$description."\n".$ico."\n".$social;
		
		
		$script = "<script>var homeURL='".Yii::app()->baseUrl."';</script>";
		
		return $meta."\n".$script;
	}
	



}
